package com.info.zhiduoduo.repository.entity.partner;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 合伙人账户流水(佣金收入，提现明细)
 * </p>
 *
 * @author bob
 * @since 2019-06-23
 */
@Data
@Accessors(chain = true)
@TableName("zdd_partner_accountflow")
public class PartnerAccountflow extends Model<PartnerAccountflow> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private Integer partnerid;
    /**
     * 企业id
     */
    private Integer compid;
    /**
     * 创客id
     */
    private Integer userid;
    /**
     * 佣金记录id
     */
    private Integer brokerageid;
    /**
     * 交易记录id
     */
    private Integer tradeid;
    /**
     * 项目id
     */
    private Integer projectid;
    /**
     * 项目类型，参考{@link com.info.zhiduoduo.common.constants.project.ProjectType}
     */
    private Integer projectType;
    /**
     * 提现ID
     */
    private Integer wdid;
    /**
     * 1.收入 2提现 3：手续费
     */
    private Integer flowtype;
    /**
     * 流水金额
     */
    @TableField("flow_amount")
    private BigDecimal flowAmount;
    /**
     * 金额类型（计佣类型） 1：合伙人 2：项目服务费 3：智众包佣金 4：二级合伙人佣金 6：其他
     */
    private Integer amounttype;
    /**
     * 流水名目
     */
    private String flowname;
    private Date createtime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
